﻿using System;
using System.Windows.Media;
using Caliburn.Micro;
using Microsoft.Phone.Shell;
using Wulong.Phone.Qiushi.i18n;

namespace Wulong.Phone.Qiushi.Views
{
    public partial class CommentsView
    {
        public CommentsView()
        {
            InitializeComponent();
            LoadAppBar();
        }

        private void LoadAppBar()
        {
            // Set the page's ApplicationBar to a new instance of ApplicationBar
            ApplicationBar = new ApplicationBar();
            var doneButton = new AppBarButton
            {
                IconUri = new Uri("/Toolkit.Content/ApplicationBar.Check.png", UriKind.Relative),
                Text = AppResources.V_Pic_Back_Button,
                Message = "GoBack"
            };
            ApplicationBar.Buttons.Add(doneButton);

            var sendByEmailButton = new AppBarButton
            {
                IconUri = new Uri("/images/sentbyemail.png", UriKind.Relative),
                Text = AppResources.V_QiushiList_SentByEmail_ContextMenu,
                Message = "SentByEmail"
            };
            ApplicationBar.Buttons.Add(sendByEmailButton);

            var sentBySmsButton = new AppBarButton
            {
                IconUri = new Uri("/images/sentbysms.png", UriKind.Relative),
                Text = AppResources.V_QiushiList_SentBySMS_ContextMenu,
                Message = "SentBySms"
            };
            ApplicationBar.Buttons.Add(sentBySmsButton);
            ApplicationBar.BackgroundColor = Colors.Black;
            ApplicationBar.Opacity = 0.5d;
        }
    }
}